package com.herench.bunch.clinic.handler;

import com.herench.bunch.clinic.convert.PickupAppointConvert;
import com.herench.bunch.clinic.support.AbstractClinicMessageHandler;
import com.herench.bunch.commons.annotation.Handler;
import com.herench.bunch.commons.support.WsClientFactory;
import org.apache.cxf.endpoint.Client;
import org.dom4j.Document;



@Handler(code = "200060" , name = "预约取号分割划价（app07）" , messageConvertClass = PickupAppointConvert.class)
public class PickupAppointHandlerClinic extends AbstractClinicMessageHandler {

    @Override
    protected Object proxyInvoke(Object inMessage) throws Exception {
        Document message = (Document) inMessage;

        Client client = WsClientFactory.getInstance().getWsClient(ProxyMsgCodeConstant.HIS_BD_URL);
        Object[] res = client.invoke(ProxyMsgCodeConstant.HIS_WS_DEFAULT_OPERATION, message.asXML());
        return  res[0];
    }
}
